<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>inweo.widgets.window test</title>
		<script id="mootools" src="../lib/mootools.js"></script>
		<script src="../inweo.js"></script>
		<script>
			function main() {
				inweo.require("box");
				inweo.require("button");
				inweo.require("window");
				inweo.skin("Extjs");

				var page = new inweo.widgets.vbox(this);
				var button = new inweo.widgets.pushButton();
				button.text("new inweo.widgets.window();");
				button.widget.setStyle("width", 150);
				page.pack(button);

				new inweo.core.event(button).addEvent("mousedown", function() {
					var window = new inweo.widgets.window();
					window.text("Hello dialog");
					window.onClose(function() {
						//this.cancelClose();
					});
					var handler = window.resizer.handlers.nwResizer;
					handler.setText("[");
					//return;
					var img = new Element("img");
					img.setProperty("src", "../skin/Extjs/images/nwResizerShadow.gif");
					img.setStyles({
						"position": "relative",
						"top": "-18px"
					});
					img.injectInside(handler);
				});
			}
		</script>
	</head>
	<body style="background-color: yellow;">
		<img src="../skin/Extjs/images/nwResizerShadow.png">
	</body>
</html>